package com.yss.netty.util;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

public class Constants {

    /**
     * 魔数
     */
    public static final byte MAGIC = (byte) 0xbabe;

    /**
     * 版本号
     */
    public static final byte VERSION = 0;

    /**
     * COLON :
     */
    public static final String COLON = ":";

    /**
     * IdleTime
     */
    public static final int NETTY_SERVER_HEART_BEAT_TIME = 1000 * 20 + 1000;

    /**
     * HeartBeat Time
     */
    public static final int NETTY_CLIENT_HEART_BEAT_TIME = 1000 * 10;

    /**
     * Cpus
     */
    public static final int CPUS = Runtime.getRuntime().availableProcessors();

    /**
     * PING
     */
    public static final String PING = "PING";

    /**
     * PONG
     */
    public static final String PONG = "PONG";

    /**
     * CharSet
     */
    public static final Charset UTF8 = StandardCharsets.UTF_8;

    /**
     * Netty Read TimeOut
     */
    public static final long READ_TIME_OUT = 5000L;

    /**
     * Empty String
     */
    public static final String EMPTY_STRING = " 我是空! ";


}
